// pages/desk/index.js
Page({

    /**
     * 页面的初始数据
     */
    data: {
        desklist:[],
        current:0
    },

    /**
     * 生命周期函数--监听页面加载
     */
    onShow: function (options) {
        let {userInfo} = getApp()
        if(!userInfo){return}
        let userid = userInfo.objectId
        getApp().$get(`/1.1/classes/Desk?where={"userid":"${userid}"}`).then(res=>{
            this.setData({desklist:res.data.results})
        })
    },
    handleChange(ev){
        console.log(ev);
        let {current} = ev.detail
        this.setData({current})
    }
})